def f(n):
    a, b = 0, 1
    for i in range(n):
        print(b)
        if i == n - 1:
            return a
        a, b = b, a + b


print(f(5))
